package blackstar.performance.transform.matcher;

/**
 * @author RayWoo (ayufox@gmail.com)
 *
 */
public class ExcludeSetterPointCutMatcher implements PointCutMatcher
{
	public boolean isClassMatch(String className)
	{
		return true;
	}

	public boolean isMethodMatch(String methodName)
	{
		//setter方法
		if (methodName.startsWith("set") && methodName.endsWith("V"))
		{
			int start = methodName.indexOf('(');
			int end = methodName.indexOf(')');
			if (start > 0 && end > 0 && start < end)
			{
				String param = methodName.substring(start + 1, end);
				if (param.split(";").length == 1)
				{
					return false;
				}
			}
		}
		
		return true;
	}

	public String matchPackage(String packageName)
	{
		return "";
	}
}
